<template>
  <div style="margin: 20px;">
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="昵称">
        <el-input v-model="formInline.nickname" placeholder="请输入昵称名" clearable />
      </el-form-item>
      <el-form-item label="角色">
        <el-input v-model="formInline.rolename" placeholder="请输入角色名" clearable />
      </el-form-item>
      <el-form-item label="用户名">
        <el-input v-model="formInline.username" placeholder="请输入用户名" clearable />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="emits('search', formInline)">搜索</el-button>
        <el-button type="success" @click="emits('add')">新增</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script setup>
import { reactive } from 'vue'
const formInline = reactive({
  nickname: "",
  rolename: "",
  username: ""
})
const emits = defineEmits(['search', 'add'])
</script>
<style scoped></style>
